a=[1,2,3,4]
count=0
for i in a:
    for j in a:
        for k in a:
            if i!=j and i!=k and j!=k:
                count+=1
                print(i,j,k)
                print()
print("共有{}个数".format(count))